using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ThuySan.Bussiness
{
	[Serializable]
	[Table("[dbo].[Product]")]
	public partial class Product
	{

		#region Properties

		[Key]
		[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[Required]
		[Column("ProductId")]
		public System.Int32 ProductId { get; set; }

		[Column("CategoryId")]
		public System.Int32? CategoryId { get; set; }

		[Column("Name")]
		public System.String Name { get; set; }

		[Column("Description")]
		public System.String Description { get; set; }

		[Column("Detail")]
		public System.String Detail { get; set; }

		[Column("PromotionalPrice")]
		public System.Int32? PromotionalPrice { get; set; }

		[Column("Price")]
		public System.Int32? Price { get; set; }

		[Column("PageUrl")]
		public System.String PageUrl { get; set; }

		[Column("Priority")]
		public System.Int32? Priority { get; set; }

		[Column("Viewer")]
		public System.Int32? Viewer { get; set; }

		[Column("AvatarImage")]
		public System.String AvatarImage { get; set; }

		[Column("Status")]
		public System.Boolean? Status { get; set; }

		[Column("IsReduced")]
		public System.Boolean? IsReduced { get; set; }

		[Column("IsVisibled")]
		public System.Boolean? IsVisibled { get; set; }

		[Column("LastModified")]
		public System.DateTime? LastModified { get; set; }

		#endregion

		#region Navigation

		[ForeignKey("ProductId")]
		public virtual ICollection<ProductProperty> ProductPropertys { get; set; }
		[ForeignKey("ProductId")]
		public virtual ICollection<ProductTag> ProductTags { get; set; }
		[ForeignKey("ProductId")]
		public virtual ICollection<Image> Images { get; set; }
		[ForeignKey("CategoryId")]
		public virtual Category Category { get; set; }

		#endregion

	}
}
